package com.csun.cmny.provider.service.impl;

import com.csun.cmny.core.support.BaseService;
import com.csun.cmny.provider.dao.DmcHintMapper;
import com.csun.cmny.provider.model.domain.DmcHintTypeColorBind;
import com.csun.cmny.provider.model.dto.hintColor.DmcHintColorDto;
import com.csun.cmny.provider.model.vo.DmcHintColorVo;
import com.csun.cmny.provider.service.DmcHintService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class DmcHintServiceImpl extends BaseService<DmcHintTypeColorBind>  implements DmcHintService {

    @Resource
    private DmcHintMapper dmcHintMapper;
    @Override
    public List<DmcHintColorVo> selectAll(Long groupId) {
        return dmcHintMapper.selectColor(groupId);
    }

    @Override
    public Integer updateHintColor(List<DmcHintColorDto> dmcHintColorDtoList,Long groupId) {

        return dmcHintMapper.batchUpdate(dmcHintColorDtoList,groupId);
    }

    @Override
    public Integer addHintColor(List<DmcHintColorDto> dmcHintColorDtoList) {
        return dmcHintMapper.insertHintColor(dmcHintColorDtoList);
    }
}
